/**
 * Created by Administrator on 2016/7/29.
 */
//    全部商品中的下拉点击菜单JS
var primary_0 = document.querySelector('.primary_0');
var primary_00 = document.querySelector('.primary_00');
var primary_1_dl = document.querySelector('.primary_1 dl');
var primary_4_dl = document.querySelector('.primary_4 dl');
var primary_6_dl = document.querySelector('.primary_6 dl');
var primary_8_dl = document.querySelector('.primary_8 dl');
var primary_10_dl = document.querySelector('.primary_10 dl');
var primary_12_dl = document.querySelector('.primary_12 dl');
var primary_14_dl = document.querySelector('.primary_14 dl');
var primary_1 = document.querySelector('.primary_1');
var primary_2 = document.querySelector('.primary_2');
var primary_4 = document.querySelector('.primary_4');
var primary_5 = document.querySelector('.primary_5');
var primary_6 = document.querySelector('.primary_6');
var primary_7 = document.querySelector('.primary_7');
var primary_8 = document.querySelector('.primary_8');
var primary_9 = document.querySelector('.primary_9');
var primary_10 = document.querySelector('.primary_10');
var primary_11 = document.querySelector('.primary_11');
var primary_12 = document.querySelector('.primary_12');
var primary_13 = document.querySelector('.primary_13');
var primary_14 = document.querySelector('.primary_14');
var pa0 = document.querySelector('.pa0');
var pa1 = document.querySelector('.pa1');
var pa2 = document.querySelector('.pa2');
var pa3 = document.querySelector('.pa3');
var pa4 = document.querySelector('.pa4');
var pa5 = document.querySelector('.pa5');
var pa6 = document.querySelector('.pa6');
var pa7 = document.querySelector('.pa7');
var pa8 = document.querySelector('.pa8');
var pa9 = document.querySelector('.pa9');
var pa10 = document.querySelector('.pa10');
var pa11 = document.querySelector('.pa11');
var pa12 = document.querySelector('.pa12');
var pa13 = document.querySelector('.pa13');
// 第一张more
primary_00.addEventListener('mouseover',function(){
    pa0.style.display = 'block';
    primary_00.style.marginTop = '3px';
    primary_00.style.width = '224px';
    primary_00.style.zIndex = '20';
    primary_00.style.background = '#fff';
    primary_1_dl.style.borderTop = 'none';
    primary_00.style.borderBottom = '1px solid #ddd';
});
primary_00.addEventListener('mouseout',function(){
    pa0.style.display = 'none';
    primary_00.style.marginTop = '0';
    primary_00.style.width = '223px';
    primary_00.style.zIndex = '0';
    primary_0.style.width = '223px';
    primary_1_dl.style.borderTop = '1px dotted #666';
    primary_00.style.borderBottom = 'none';
});
pa0.addEventListener('mouseover',function(){
    pa0.style.display = 'block';
    primary_00.style.marginTop = '3px';
    primary_00.style.width = '224px';
    primary_00.style.zIndex = '20';
    primary_00.style.background = '#fff';
    primary_1_dl.style.borderTop = 'none';
    primary_00.style.borderBottom = '1px solid #ddd';
});
pa0.addEventListener('mouseout',function(){
    pa0.style.display = 'none';
    primary_00.style.marginTop = '0';
    primary_00.style.width = '223px';
    primary_00.style.zIndex = '0';
    primary_00.style.background = '#fff';
    primary_0.style.width = '223px';
    primary_1_dl.style.borderTop = '1px dotted #666';
    primary_00.style.borderBottom = 'none';
});
// //第二张more
// primary_1.addEventListener('mouseover',function(){
//     pa1.style.display = 'block';
//     primary_1.style.marginTop = '3px';
//     primary_1.style.width = '224px';
//     primary_1.style.zIndex = '20';
//     primary_1.style.background = '#fff';
//     primary_1_dl.style.borderTop = 'none';
//     primary_1_dl.style.borderBottom = 'none';
//     primary_1.style.borderTop = '1px solid #ddd';
//     primary_1.style.borderBottom = '1px solid #ddd';
// });
// primary_1.addEventListener('mouseout',function(){
//     pa1.style.display = 'none';
//     primary_1.style.marginTop = '0';
//     primary_1.style.width = '223px';
//     primary_1.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_1_dl.style.borderTop = '1px dotted #666';
//     primary_1_dl.style.borderBottom = '1px dotted #666';
//     primary_1.style.borderTop = 'none';
//     primary_1.style.borderBottom = 'none';
// });
// pa1.addEventListener('mouseover',function(){
//     pa1.style.display = 'block';
//     primary_1.style.marginTop = '3px';
//     primary_1.style.width = '224px';
//     primary_1.style.zIndex = '20';
//     primary_1.style.background = '#fff';
//     primary_1_dl.style.borderTop = 'none';
//     primary_1_dl.style.borderBottom = 'none';
//     primary_1.style.borderTop = '1px solid #ddd';
//     primary_1.style.borderBottom = '1px solid #ddd';
// });
// pa1.addEventListener('mouseout',function(){
//     pa1.style.display = 'none';
//     primary_1.style.marginTop = '0';
//     primary_1.style.width = '223px';
//     primary_1.style.zIndex = '0';
//     primary_1.style.background = '#fff';
//     primary_0.style.width = '223px';
//     primary_1_dl.style.borderTop = '1px dotted #666';
//     primary_1_dl.style.borderBottom = '1px dotted #666';
//     primary_1.style.borderTop = 'none';
//     primary_1.style.borderBottom = 'none';
// });
// //第三张more
// primary_2.addEventListener('mouseover',function(){
//     pa2.style.display = 'block';
//     primary_2.style.marginTop = '3px';
//     primary_2.style.width = '224px';
//     primary_2.style.zIndex = '20';
//     primary_2.style.background = '#fff';
//     primary_1_dl.style.borderBottom = 'none';
//     primary_4_dl.style.borderTop = 'none';
//     primary_2.style.borderBottom = '1px solid #ddd';
//     primary_2.style.borderTop = '1px solid #ddd';
// });
// primary_2.addEventListener('mouseout',function(){
//     pa2.style.display = 'none';
//     primary_2.style.marginTop = '0';
//     primary_2.style.width = '223px';
//     primary_2.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_1_dl.style.borderBottom = '1px dotted #666';
//     primary_4_dl.style.borderTop = '1px dotted #666';
//     primary_2.style.borderBottom = 'none';
//     primary_2.style.borderTop = 'none';
// });
// pa2.addEventListener('mouseover',function(){
//     pa2.style.display = 'block';
//     primary_2.style.marginTop = '3px';
//     primary_2.style.width = '224px';
//     primary_2.style.zIndex = '20';
//     primary_2.style.background = '#fff';
//     primary_1_dl.style.borderBottom = 'none';
//     primary_4_dl.style.borderTop = 'none';
//     primary_2.style.borderBottom = '1px solid #ddd';
//     primary_2.style.borderTop = '1px solid #ddd';
// });
// pa2.addEventListener('mouseout',function(){
//     pa2.style.display = 'none';
//     primary_2.style.marginTop = '0';
//     primary_2.style.width = '223px';
//     primary_2.style.zIndex = '0';
//     primary_2.style.background = '#fff';
//     primary_0.style.width = '223px';
//     primary_1_dl.style.borderBottom = '1px dotted #666';
//     primary_4_dl.style.borderTop = '1px dotted #666';
//     primary_2.style.borderBottom = 'none';
//     primary_2.style.borderTop = 'none';
// });
// //第四张more
// primary_4.addEventListener('mouseover',function(){
//     pa3.style.display = 'block';
//     primary_4.style.marginTop = '3px';
//     primary_4.style.width = '224px';
//     primary_4.style.zIndex = '20';
//     primary_4.style.background = '#fff';
//     primary_4.style.borderTop = '1px solid #ddd';
//     primary_4.style.borderBottom = '1px solid #ddd';
//     primary_4_dl.style.borderTop = 'none';
//     primary_4_dl.style.borderBottom = 'none';
// });
// primary_4.addEventListener('mouseout',function(){
//     pa3.style.display = 'none';
//     primary_4.style.marginTop = '0';
//     primary_4.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_4.style.zIndex = '0';
//     primary_4.style.borderTop = 'none';
//     primary_4.style.borderBottom = 'none';
//     primary_4_dl.style.borderTop = '1px dotted #666';
//     primary_4_dl.style.borderBottom = '1px dotted #666';
// });
// pa3.addEventListener('mouseover',function(){
//     pa3.style.display = 'block';
//     primary_4.style.marginTop = '3px';
//     primary_4.style.width = '224px';
//     primary_4.style.zIndex = '20';
//     primary_4.style.background = '#fff';
//     primary_4.style.borderTop = '1px solid #ddd';
//     primary_4.style.borderBottom = '1px solid #ddd';
//     primary_4_dl.style.borderTop = 'none';
//     primary_4_dl.style.borderBottom = 'none'
// });
// pa3.addEventListener('mouseout',function(){
//     pa3.style.display = 'none';
//     primary_4.style.marginTop = '0';
//     primary_4.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_4.style.zIndex = '0';
//     primary_4.style.background = '#fff';
//     primary_4.style.borderTop = 'none';
//     primary_4.style.borderBottom = 'none';
//     primary_4_dl.style.borderTop = '1px dotted #666';
//     primary_4_dl.style.borderBottom = '1px dotted #666';
// });
// //第五张more
// primary_5.addEventListener('mouseover',function(){
//     pa4.style.display = 'block';
//     primary_5.style.marginTop = '3px';
//     primary_5.style.width = '224px';
//     primary_5.style.zIndex = '20';
//     primary_5.style.background = '#fff';
//     primary_4_dl.style.borderBottom = 'none';
//     primary_6_dl.style.borderTop = 'none';
//     primary_5.style.borderTop = '1px solid #ddd';
//     primary_5.style.borderBottom = '1px solid #ddd';
// });
// primary_5.addEventListener('mouseout',function(){
//     pa4.style.display = 'none';
//     primary_5.style.marginTop = '0';
//     primary_5.style.width = '223px';
//     primary_5.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_4_dl.style.borderBottom = '1px dotted #666';
//     primary_6_dl.style.borderTop = '1px dotted #666';
//     primary_5.style.borderTop = 'none';
//     primary_5.style.borderBottom = 'none';
// });
// pa4.addEventListener('mouseover',function(){
//     pa4.style.display = 'block';
//     primary_5.style.marginTop = '3px';
//     primary_5.style.width = '224px';
//     primary_5.style.zIndex = '20';
//     primary_5.style.background = '#fff';
//     primary_4_dl.style.borderBottom = 'none';
//     primary_6_dl.style.borderTop = 'none';
//     primary_5.style.borderTop = '1px solid #ddd';
//     primary_5.style.borderBottom = '1px solid #ddd';
//
// });
// pa4.addEventListener('mouseout',function(){
//     pa4.style.display = 'none';
//     primary_5.style.marginTop = '0';
//     primary_5.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_5.style.zIndex = '0';
//     primary_5.style.background = '#fff';
//     primary_4_dl.style.borderBottom = '1px dotted #666';
//     primary_6_dl.style.borderTop = '1px dotted #666';
//     primary_5.style.borderTop = 'none';
//     primary_5.style.borderBottom = 'none';
// });
// // 第六张more
// primary_6.addEventListener('mouseover',function(){
//     pa5.style.display = 'block';
//     primary_6.style.marginTop = '3px';
//     primary_6.style.width = '224px';
//     primary_6.style.zIndex = '20';
//     primary_6.style.background = '#fff';
//     primary_6_dl.style.borderTop = 'none';
//     primary_6_dl.style.borderBottom = 'none';
//     primary_6.style.borderTop = '1px solid #ddd';
//     primary_6.style.borderBottom = '1px solid #ddd';
// });
// primary_6.addEventListener('mouseout',function(){
//     pa5.style.display = 'none';
//     primary_6.style.marginTop = '0';
//     primary_6.style.width = '223px';
//     primary_6.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_6_dl.style.borderTop = '1px dotted #666';
//     primary_6_dl.style.borderBottom = '1px dotted #666';
//     primary_6.style.borderTop = 'none';
//     primary_6.style.borderBottom = 'none';
// });
// pa5.addEventListener('mouseover',function(){
//     pa5.style.display = 'block';
//     primary_6.style.marginTop = '3px';
//     primary_6.style.width = '224px';
//     primary_6.style.zIndex = '20';
//     primary_6.style.background = '#fff';
//     primary_6_dl.style.borderTop = 'none';
//     primary_6_dl.style.borderBottom = 'none';
//     primary_6.style.borderTop = '1px solid #ddd';
//     primary_6.style.borderBottom = '1px solid #ddd';
//
// });
// pa5.addEventListener('mouseout',function(){
//     pa5.style.display = 'none';
//     primary_6.style.marginTop = '0';
//     primary_6.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_6.style.zIndex = '0';
//     primary_6.style.background = '#fff';
//     primary_6_dl.style.borderTop = '1px dotted #666';
//     primary_6_dl.style.borderBottom = '1px dotted #666';
//     primary_6.style.borderTop = 'none';
//     primary_6.style.borderBottom = 'none';
// });
// //第七张more
// primary_7.addEventListener('mouseover',function(){
//     pa6.style.display = 'block';
//     primary_7.style.marginTop = '3px';
//     primary_7.style.width = '224px';
//     primary_7.style.zIndex = '20';
//     primary_7.style.background = '#fff';
//     primary_6_dl.style.borderBottom = 'none';
//     primary_8_dl.style.borderTop = 'none';
//     primary_7.style.borderTop = '1px solid #ddd';
//     primary_7.style.borderBottom = '1px solid #ddd';
// });
// primary_7.addEventListener('mouseout',function(){
//     pa6.style.display = 'none';
//     primary_7.style.marginTop = '0';
//     primary_7.style.width = '223px';
//     primary_7.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_6_dl.style.borderBottom = '1px dotted #666';
//     primary_8_dl.style.borderTop = '1px dotted #666';
//     primary_7.style.borderTop = 'none';
//     primary_7.style.borderBottom = 'none';
// });
// pa6.addEventListener('mouseover',function(){
//     pa6.style.display = 'block';
//     primary_7.style.marginTop = '3px';
//     primary_7.style.width = '224px';
//     primary_7.style.zIndex = '20';
//     primary_7.style.background = '#fff';
//     primary_6_dl.style.borderBottom = 'none';
//     primary_8_dl.style.borderTop = 'none';
//     primary_7.style.borderTop = '1px solid #ddd';
//     primary_7.style.borderBottom = '1px solid #ddd';
//
// });
// pa6.addEventListener('mouseout',function(){
//     pa6.style.display = 'none';
//     primary_7.style.marginTop = '0';
//     primary_7.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_7.style.zIndex = '0';
//     primary_7.style.background = '#fff';
//     primary_6_dl.style.borderBottom = '1px dotted #666';
//     primary_8_dl.style.borderTop = '1px dotted #666';
//     primary_7.style.borderTop = 'none';
//     primary_7.style.borderBottom = 'none';
// });
// //第八张more
// primary_8.addEventListener('mouseover',function(){
//     pa7.style.display = 'block';
//     primary_8.style.marginTop = '3px';
//     primary_8.style.width = '224px';
//     primary_8.style.zIndex = '20';
//     primary_8.style.background = '#fff';
//     primary_8_dl.style.borderTop = 'none';
//     primary_8_dl.style.borderBottom = 'none';
//     primary_8.style.borderTop = '1px solid #ddd';
//     primary_8.style.borderBottom = '1px solid #ddd';
// });
// primary_8.addEventListener('mouseout',function(){
//     pa7.style.display = 'none';
//     primary_8.style.marginTop = '0';
//     primary_8.style.width = '223px';
//     primary_8.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_8_dl.style.borderTop = '1px dotted #666';
//     primary_8_dl.style.borderBottom = '1px dotted #666';
//     primary_8.style.borderTop = 'none';
//     primary_8.style.borderBottom = 'none';
// });
// pa7.addEventListener('mouseover',function(){
//     pa7.style.display = 'block';
//     primary_8.style.marginTop = '3px';
//     primary_8.style.width = '224px';
//     primary_8.style.zIndex = '20';
//     primary_8.style.background = '#fff';
//     primary_8_dl.style.borderTop = 'none';
//     primary_8_dl.style.borderBottom = 'none';
//     primary_8.style.borderTop = '1px solid #ddd';
//     primary_8.style.borderBottom = '1px solid #ddd';
// });
// pa7.addEventListener('mouseout',function(){
//     pa7.style.display = 'none';
//     primary_8.style.marginTop = '0';
//     primary_8.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_8.style.zIndex = '0';
//     primary_8.style.background = '#fff';
//     primary_8_dl.style.borderTop = '1px dotted #666';
//     primary_8_dl.style.borderBottom = '1px dotted #666';
//     primary_8.style.borderTop = 'none';
//     primary_8.style.borderBottom = 'none';
// });
// //第九张more
// primary_9.addEventListener('mouseover',function(){
//     pa8.style.display = 'block';
//     primary_9.style.marginTop = '3px';
//     primary_9.style.width = '224px';
//     primary_9.style.zIndex = '20';
//     primary_9.style.background = '#fff';
//     primary_8_dl.style.borderBottom = 'none';
//     primary_10_dl.style.borderTop = 'none';
//     primary_9.style.borderBottom = '1px solid #ddd';
//     primary_9.style.borderTop = '1px solid #ddd';
// });
// primary_9.addEventListener('mouseout',function(){
//     pa8.style.display = 'none';
//     primary_9.style.marginTop = '0';
//     primary_9.style.width = '223px';
//     primary_9.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_8_dl.style.borderBottom = '1px dotted #666';
//     primary_10_dl.style.borderTop = '1px dotted #666';
//     primary_9.style.borderBottom = 'none';
//     primary_9.style.borderTop = 'none';
// });
// pa8.addEventListener('mouseover',function(){
//     pa8.style.display = 'block';
//     primary_9.style.marginTop = '3px';
//     primary_9.style.width = '224px';
//     primary_9.style.zIndex = '20';
//     primary_9.style.background = '#fff';
//     primary_8_dl.style.borderBottom = 'none';
//     primary_10_dl.style.borderTop = 'none';
//     primary_9.style.borderBottom = '1px solid #ddd';
//     primary_9.style.borderTop = '1px solid #ddd';
//
// });
// pa8.addEventListener('mouseout',function(){
//     pa8.style.display = 'none';
//     primary_9.style.marginTop = '0';
//     primary_9.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_9.style.zIndex = '0';
//     primary_9.style.background = '#fff';
//     primary_8_dl.style.borderBottom = '1px dotted #666';
//     primary_10_dl.style.borderTop = '1px dotted #666';
//     primary_9.style.borderBottom = 'none';
//     primary_9.style.borderTop = 'none';
// });
// //第十张more
// primary_10.addEventListener('mouseover',function(){
//     pa9.style.display = 'block';
//     primary_10.style.marginTop = '3px';
//     primary_10.style.width = '224px';
//     primary_10.style.zIndex = '20';
//     primary_10.style.background = '#fff';
//     primary_10_dl.style.borderTop = 'none';
//     primary_10_dl.style.borderBottom = 'none';
//     primary_10.style.borderTop = '1px solid #ddd';
//     primary_10.style.borderBottom = '1px solid #ddd';
// });
// primary_10.addEventListener('mouseout',function(){
//     pa9.style.display = 'none';
//     primary_10.style.marginTop = '0';
//     primary_10.style.width = '223px';
//     primary_10.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_10_dl.style.borderTop = '1px dotted #666';
//     primary_10_dl.style.borderBottom = '1px dotted #666';
//     primary_10.style.borderTop = 'none';
//     primary_10.style.borderBottom = 'none';
// });
// pa9.addEventListener('mouseover',function(){
//     pa9.style.display = 'block';
//     primary_10.style.marginTop = '3px';
//     primary_10.style.width = '224px';
//     primary_10.style.zIndex = '20';
//     primary_10.style.background = '#fff';
//     primary_10_dl.style.borderTop = 'none';
//     primary_10_dl.style.borderBottom = 'none';
//     primary_10.style.borderTop = '1px solid #ddd';
//     primary_10.style.borderBottom = '1px solid #ddd';
//
// });
// pa9.addEventListener('mouseout',function(){
//     pa9.style.display = 'none';
//     primary_10.style.marginTop = '0';
//     primary_10.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_10.style.zIndex = '0';
//     primary_10.style.background = '#fff';
//     primary_10_dl.style.borderTop = '1px dotted #666';
//     primary_10_dl.style.borderBottom = '1px dotted #666';
//     primary_10.style.borderTop = 'none';
//     primary_10.style.borderBottom = 'none';
// });
// //第十一张more
// primary_11.addEventListener('mouseover',function(){
//     pa10.style.display = 'block';
//     primary_11.style.marginTop = '3px';
//     primary_11.style.width = '224px';
//     primary_11.style.zIndex = '20';
//     primary_11.style.background = '#fff';
//     primary_10_dl.style.borderBottom = 'none';
//     primary_12_dl.style.borderTop = 'none';
//     primary_11.style.borderBottom = '1px solid #ddd';
//     primary_11.style.borderTop = '1px solid #ddd';
// });
// primary_11.addEventListener('mouseout',function(){
//     pa10.style.display = 'none';
//     primary_11.style.marginTop = '0';
//     primary_11.style.width = '223px';
//     primary_11.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_10_dl.style.borderBottom = '1px dotted #666';
//     primary_12_dl.style.borderTop = '1px dotted #666';
//     primary_11.style.borderBottom = 'none';
//     primary_11.style.borderTop = 'none';
// });
// pa10.addEventListener('mouseover',function(){
//     pa10.style.display = 'block';
//     primary_11.style.marginTop = '3px';
//     primary_11.style.width = '224px';
//     primary_11.style.zIndex = '20';
//     primary_11.style.background = '#fff';
//     primary_10_dl.style.borderBottom = 'none';
//     primary_12_dl.style.borderTop = 'none';
//     primary_11.style.borderBottom = '1px solid #ddd';
//     primary_11.style.borderTop = '1px solid #ddd';
//
// });
// pa10.addEventListener('mouseout',function(){
//     pa10.style.display = 'none';
//     primary_11.style.marginTop = '0';
//     primary_11.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_11.style.zIndex = '0';
//     primary_11.style.background = '#fff';
//     primary_10_dl.style.borderBottom = '1px dotted #666';
//     primary_12_dl.style.borderTop = '1px dotted #666';
//     primary_11.style.borderBottom = 'none';
//     primary_11.style.borderTop = 'none';
// });
// //第十二张more
// primary_12.addEventListener('mouseover',function(){
//     pa11.style.display = 'block';
//     primary_12.style.marginTop = '3px';
//     primary_12.style.width = '224px';
//     primary_12.style.zIndex = '20';
//     primary_12.style.background = '#fff';
//     primary_12_dl.style.borderTop = 'none';
//     primary_12_dl.style.borderBottom = 'none';
//     primary_12.style.borderTop = '1px solid #ddd';
//     primary_12.style.borderBottom = '1px solid #ddd';
// });
// primary_12.addEventListener('mouseout',function(){
//     pa11.style.display = 'none';
//     primary_12.style.marginTop = '0';
//     primary_12.style.width = '223px';
//     primary_12.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_12_dl.style.borderBottom = '1px dotted #666';
//     primary_12_dl.style.borderTop = '1px dotted #666';
//     primary_12.style.borderBottom = 'none';
//     primary_12.style.borderTop = 'none';
// });
// pa11.addEventListener('mouseover',function(){
//     pa11.style.display = 'block';
//     primary_12.style.marginTop = '3px';
//     primary_12.style.width = '224px';
//     primary_12.style.zIndex = '20';
//     primary_12.style.background = '#fff';
//     primary_12_dl.style.borderTop = 'none';
//     primary_12_dl.style.borderBottom = 'none';
//     primary_12.style.borderTop = '1px solid #ddd';
//     primary_12.style.borderBottom = '1px solid #ddd';
// });
// pa11.addEventListener('mouseout',function(){
//     pa11.style.display = 'none';
//     primary_12.style.marginTop = '0';
//     primary_12.style.width = '223px';
//     primary_0.style.width = '223px';
//     primary_12.style.zIndex = '0';
//     primary_12.style.background = '#fff';
//     primary_12_dl.style.borderBottom = '1px dotted #666';
//     primary_12_dl.style.borderTop = '1px dotted #666';
//     primary_12.style.borderBottom = 'none';
//     primary_12.style.borderTop = 'none';
// });
// //第十三张more
// primary_13.addEventListener('mouseover',function(){
//     pa12.style.display = 'block';
//     primary_13.style.marginTop = '3px';
//     primary_13.style.width = '224px';
//     primary_13.style.zIndex = '20';
//     primary_13.style.background = '#fff';
//     primary_12_dl.style.borderBottom = 'none';
//     primary_14_dl.style.borderTop = 'none';
//     primary_13.style.borderTop = '1px solid #ddd';
//     primary_13.style.borderBottom = '1px solid #ddd';
// });
// primary_13.addEventListener('mouseout',function(){
//     pa12.style.display = 'none';
//     primary_13.style.marginTop = '0';
//     primary_13.style.width = '223px';
//     primary_13.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_12_dl.style.borderBottom = '1px dotted #666';
//     primary_14_dl.style.borderTop = '1px dotted #666';
//     primary_13.style.borderTop = 'none';
//     primary_13.style.borderBottom = 'none';
// });
// pa12.addEventListener('mouseover',function(){
//     pa12.style.display = 'block';
//     primary_13.style.marginTop = '3px';
//     primary_13.style.width = '224px';
//     primary_13.style.zIndex = '20';
//     primary_13.style.background = '#fff';
//     primary_12_dl.style.borderBottom = 'none';
//     primary_14_dl.style.borderTop = 'none';
//     primary_13.style.borderTop = '1px solid #ddd';
//     primary_13.style.borderBottom = '1px solid #ddd';
// });
// pa12.addEventListener('mouseout',function(){
//     pa12.style.display = 'none';
//     primary_13.style.marginTop = '0';
//     primary_13.style.width = '223px';
//     primary_13.style.zIndex = '0';
//     primary_13.style.background = '#fff';
//     primary_0.style.width = '223px';
//     primary_12_dl.style.borderBottom = '1px dotted #666';
//     primary_14_dl.style.borderTop = '1px dotted #666';
//     primary_13.style.borderTop = 'none';
//     primary_13.style.borderBottom = 'none';
// });
// //第十四张more
// primary_14.addEventListener('mouseover',function(){
//     pa13.style.display = 'block';
//     primary_14.style.marginTop = '3px';
//     primary_14.style.width = '224px';
//     primary_14.style.zIndex = '20';
//     primary_14.style.background = '#fff';
//     primary_14_dl.style.borderTop = 'none';
//     primary_14.style.borderTop = '1px solid #ddd';
//     primary_14.style.borderBottom = '1px solid #ddd';
// });
// primary_14.addEventListener('mouseout',function(){
//     pa13.style.display = 'none';
//     primary_14.style.marginTop = '0';
//     primary_14.style.width = '223px';
//     primary_14.style.zIndex = '0';
//     primary_0.style.width = '223px';
//     primary_14_dl.style.borderTop = '1px dotted #666';
//     primary_14.style.borderTop = 'none';
//     primary_14.style.borderBottom = 'none';
// });
// pa13.addEventListener('mouseover',function(){
//     pa13.style.display = 'block';
//     primary_14.style.marginTop = '3px';
//     primary_14.style.width = '224px';
//     primary_14.style.zIndex = '20';
//     primary_14.style.background = '#fff';
//     primary_14_dl.style.borderTop = 'none';
//     primary_14.style.borderTop = '1px solid #ddd';
//     primary_14.style.borderBottom = '1px solid #ddd';
// });
// pa13.addEventListener('mouseout',function(){
//     pa13.style.display = 'none';
//     primary_14.style.marginTop = '0';
//     primary_14.style.width = '223px';
//     primary_14.style.zIndex = '0';
//     primary_14.style.background = '#fff';
//     primary_0.style.width = '223px';
//     primary_14_dl.style.borderTop = '1px dotted #666';
//     primary_14.style.borderTop = 'none';
//     primary_14.style.borderBottom = 'none';
// });none



// 轮播图  Jquery
$(function () {
    var container = $('.container');
    var list = $('#list');
    var buttons = $('#buttons span');
    var prev = $('#prev');
    var next = $('#next');
    var index = 1;
    var len = 6;
    var interval = 4500;
    var timer;


    function animate (offset) {
        var left = parseInt(list.css('left')) + offset;
        if (offset>0) {
            offset = '+=' + offset;
        }
        else {
            offset = '-=' + Math.abs(offset);
        }
        list.animate({'left': offset}, 300, function () {
            if(left > -200){
                list.css('left', -750 * len);
            }
            if(left < (-750 * len)) {
                list.css('left', -750);
            }
        });
    }

    function showButton() {
        buttons.eq(index-1).addClass('on').siblings().removeClass('on');
    }

    function play() {
        timer = setTimeout(function () {
            next.trigger('click');
            play();
        }, interval);
    }
    function stop() {
        clearTimeout(timer);
    }

    next.bind('click', function () {
        if (list.is(':animated')) {
            return;
        }
        if (index == 6) {
            index = 1;
        }
        else {
            index += 1;
        }
        animate(-750);
        showButton();
    });

    prev.bind('click', function () {
        if (list.is(':animated')) {
            return;
        }
        if (index == 1) {
            index = 6;
        }
        else {
            index -= 1;
        }
        animate(750);
        showButton();
    });

    buttons.each(function () {
        $(this).bind('click', function () {
            if (list.is(':animated') || $(this).attr('class')=='on') {
                return;
            }
            var myIndex = parseInt($(this).attr('index'));
            var offset = -750 * (myIndex - index);

            animate(offset);
            index = myIndex;
            showButton();
        })
    });

    container.hover(stop, play);

    play();

});


//倒计时
var target_time = new Date('2016-8-08 18:50:00'.replace(/-/g,'/')).getTime();
var now_time = new Date().getTime();
var t = Math.floor((target_time - now_time) / 1000);
var MIN = 60;
var HOUR = MIN * 60;
var DAY = HOUR * 24;
function num(n) {
    var str = '0' + (n > 0 ? n : 0);
    return str.substr(-2);
};
function timer(){
    var days = Math.floor(t / DAY);
    var hours = Math.floor(t % DAY / HOUR);
    var minutes = Math.floor(t % HOUR / MIN);
    var seconds = Math.floor(t % MIN);
    if(t < 60){
        //小于60秒的
        var content = '刚刚发布';
    }else if(days <= 1){
        //如果是今天的就只显示小时，分钟和秒
//            var content = num(hours) + ":" + num(minutes) + ":" + num(seconds) ;
        var h = num(hours) ;
        var d = ":" ;
        var m = num(minutes) ;
        var s = num(seconds) ;
    }else{
        //如果不符合上面两个，就显示所有的
//            var content =  num(hours) + ":" + num(minutes) + ":" + num(seconds);
        var h = num(hours) ;
        var d = ":" ;
        var m = num(minutes) ;
        var s = num(seconds) ;
    }

//        document.getElementById("timer").innerHTML = content;
    document.getElementById("time_1").innerHTML = h;
    document.getElementById("time_2").innerHTML = d;
    document.getElementById("time_3").innerHTML = m;
    document.getElementById("time_4").innerHTML = d;
    document.getElementById("time_5").innerHTML = s;
};
function main() {
    timer();
    setTimeout(function() {
        t -= 1;
        timer();
        if (t > 0) {
            setTimeout(arguments.callee, 1000);
        }
    }, 1000);
};
main();

/* 图片列表点击出现暗色背景 */
$(function(){
    $('._cover1').mouseover(function(){
        $('._cover1').css({background:'#ccc'});
    });
    $('._cover1').mouseout(function(){
        $('._cover1').css({background:'none'});
    });
    $('._cover2').mouseover(function(){
        $('._cover2').css({background:'#ccc'});
    });
    $('._cover2').mouseout(function(){
        $('._cover2').css({background:'none'});
    });
    $('._cover3').mouseover(function(){
        $('._cover3').css({background:'#ccc'});
    });
    $('._cover3').mouseout(function(){
        $('._cover3').css({background:'none'});
    });
    $('._cover4').mouseover(function(){
        $('._cover4').css({background:'#ccc'});
    });
    $('._cover4').mouseout(function(){
        $('._cover4').css({background:'none'});
    });
    $('._cover5').mouseover(function(){
        $('._cover5').css({background:'#ccc'});
    });
    $('._cover5').mouseout(function(){
        $('._cover5').css({background:'none'});
    });
    $('._cover6').mouseover(function(){
        $('._cover6').css({background:'#ccc'});
    });
    $('._cover6').mouseout(function(){
        $('._cover6').css({background:'none'});
    });
    $('._cover7').mouseover(function(){
        $('._cover7').css({background:'#ccc'});
    });
    $('._cover7').mouseout(function(){
        $('._cover7').css({background:'none'});
    });
    $('._cover8').mouseover(function(){
        $('._cover8').css({background:'#ccc'});
    });
    $('._cover8').mouseout(function(){
        $('._cover8').css({background:'none'});
    });
})

